/**
 * 
 */
package cn.nawang.ebeim.client;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import cn.nawang.ebeim.client.bean.LocalBackupQueue;
import cn.nawang.ebeim.client.bean.LocalBackupTask;

/**
 * @ClassName: LocalBackupThread
 * @Description: 本地备份
 * @author 张建峰
 * @date 2015年9月17日 上午10:44:31
 * @version v1.0
 */
public class LocalBackupThread implements Runnable {
  private static final Logger LOG = LoggerFactory.getLogger(LocalBackupThread.class);
  public void run() {
    
    while(!AppMain.stopFlag.get()){
      LOG.info("start LocalBackupThread {}");
      LocalBackupTask task = null;
      try {
        task = LocalBackupQueue.dequeue();
        task.execute();
      } catch (InterruptedException e) {
        e.printStackTrace();
        LOG.info("LocalBackupThread throw InterruptedException");
      }
      
    }
    
  }

}
